Returns an object variable by name or id.
#include <IE.au3>
_IEGetObjByName ( ByRef $o_object, $s_Id [, $i_index = 0] )
Parameters
$o_object | Object variable of an InternetExplorer.Application, Window or Frame object |
$s_Id | Specifies name or id of the object you wish to match |
$i_index | Optional: If name of id occurs more than once, specifies instance by 0-based index 0 (Default) or positive integer returns an indexed instance -1 returns a collection of the specified objects |
Return Value
Success: | Returns an object variable pointing to the specified Object, @EXTENDED = specified object count |
Failure: | Returns 0 and sets @ERROR |
@Error: | 0 ($_IEStatus_Success) = No Error |
3 ($_IEStatus_InvalidDataType) = Invalid Data Type | |
7 ($_IEStatus_NoMatch) = No Match | |
@Extended: | Contains invalid parameter number |
Remarks
This function will return an object reference to any object in the document with a specified name.
Related
None.
Example
; *******************************************************
; Example 1 - Open a browser to the form example, get an object reference
; to the element with the name "ExampleForm". In this case the
; result is identical to using $oForm = _IEFormGetObjByName($oIE, "ExampleForm")
; *******************************************************
;
#include <IE.au3>
$oIE = _IE_Example ("form")
$oForm = _IEGetObjByName ($oIE, "ExampleForm")